package com.jy.mapper;

import com.jy.model.M_Vehicle;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;

import java.util.List;

@Mapper
@Component
public interface VehicleMapper {

    @Select("SELECT * FROM M_VEHICLE WHERE ID = #{vehicleId} ")
    public List<M_Vehicle> queryVehicleByVehicleId(String vehicleId);
//    @Select("SELECT * FROM M_VEHICLE WHERE VEHICLE_NAME LIKE '%'||#{name}||'%'   ")
    @Select("SELECT * FROM M_VEHICLE WHERE VEHICLE_NAME LIKE '%'||#{name}||'%'   ")
    public List<M_Vehicle> queryVehicleByName(String name);

    @Select("SELECT * FROM M_VEHICLE WHERE SERIES_ID ={id}")
    public List<M_Vehicle> queryVehicleListBySeriesId(String id);
}
